package a.f.g;

import a.c.e;
import a.c.k;
import a.c.v;
import a.c.z;
import a.d.m;
import a.d.p;
import a.d.t;
import a.f.o;
import a.f.rc;
import a.f.vc;
import a.f.zc;

import java.awt.*;
import java.util.Comparator;

public class l
  implements vc
{
  public static final Object e = "y.layout.organic.ShuffleLayouter.MINIMAL_DISTANCE_DPKEY";
  public static final Object f = "y.layout.organic.ShuffleLayouter.FIXED_NODE_DPKEY";
  private static final boolean g = false;
  private rc h;
  private double i = 5.0D;
  private boolean j = false;
  private byte k = 2;
  private Rectangle[] l;
  private int[] m;
  private int[] n;
  private e[] o;
  private Comparator p;
  public static final byte q = 0;
  public static final byte r = 1;
  public static final byte s = 2;
  private boolean t;
  private k u;
  private boolean v = true;
  public static int w;
  
  public void doLayout(o paramo)
  {
    if ((j.c) || (this.h != null)) {
      this.h.doLayout(paramo);
    }
    if (paramo.j() > 0) {
      a(paramo);
    }
  }
  
  public boolean canLayout(o paramo)
  {
    if ((j.c) || (this.h != null)) {
      return this.h.canLayout(paramo);
    }
    return paramo != null;
  }
  
  public void a(rc paramrc)
  {
    this.h = paramrc;
  }
  
  public rc a()
  {
    return this.h;
  }
  
  public void a(byte paramByte)
  {
    this.k = paramByte;
  }
  
  public byte b()
  {
    return this.k;
  }
  
  public void a(double paramDouble)
  {
    if (paramDouble < 0.0D) {
      throw new IllegalArgumentException("Minimal distance must be non-negative");
    }
    this.i = paramDouble;
  }
  
  public double c()
  {
    return this.i;
  }
  
  public void a(boolean paramBoolean)
  {
    this.j = paramBoolean;
  }
  
  public boolean d()
  {
    return this.j;
  }
  
  private void a(o paramo)
  {
    boolean bool = j.c;
    int i10 = j.b;
    this.o = paramo.t();
    this.l = new Rectangle[paramo.j()];
    double[] arrayOfDouble1 = new double[paramo.j() * 2];
    double[] arrayOfDouble2 = new double[paramo.j() * 2];
    this.u = paramo.c(f);
    k localk = paramo.c(e);
    double d1 = c();
    double d2;
    int i3;
    if ((bool) || ((d1 != 0.0D) || (localk != null)))
    {
      d2 = d1 * 0.5D;
      i3 = this.o.length - 1;
    }
    label174:
    label176:
    Object localObject;
    while (i3 >= 0)
    {
      if (i10 != 0) {
        break label1037;
      }
      if (localk != null)
      {
        double d3 = localk.getDouble(this.o[i3]);
        if (!bool) {
          if (d3 > 0.0D)
          {
            if (bool) {
              break label174;
            }
            d2 = d3 * 0.5D;
            if (i10 == 0) {
              break label176;
            }
          }
        }
        d2 = d1 * 0.5D;
      }
      zc localzc = paramo.d(this.o[i3]);
      arrayOfDouble1[(i3 << 1)] = localzc.c();
      arrayOfDouble1[((i3 << 1) + 1)] = localzc.d();
      arrayOfDouble2[(i3 << 1)] = localzc.a();
      arrayOfDouble2[((i3 << 1) + 1)] = localzc.b();
      int i6 = (int)Math.floor(localzc.a() - d2);
      int i7 = (int)Math.floor(localzc.b() - d2);
      int i8 = (int)Math.ceil(localzc.a() + localzc.c() + d2);
      int i9 = (int)Math.ceil(localzc.b() + localzc.d() + d2);
      this.l[i3] = new Rectangle(i6, i7, i8 - i6, i9 - i7);
      i3--;
      if (i10 != 0)
      {
        if (bool) {
          break label556;
        }
        int i1 = this.o.length - 1;
        do
        {
          if (i1 < 0) {
            break;
          }
          localObject = paramo.d(this.o[i1]);
          arrayOfDouble1[(i1 << 1)] = ((zc)localObject).c();
          arrayOfDouble1[((i1 << 1) + 1)] = ((zc)localObject).d();
          i3 = (int)Math.floor(((zc)localObject).a());
          int i5 = (int)Math.floor(((zc)localObject).b());
          i6 = (int)Math.ceil(((zc)localObject).a() + ((zc)localObject).c());
          i7 = (int)Math.ceil(((zc)localObject).b() + ((zc)localObject).d());
          this.l[i1] = new Rectangle(i3, i5, i6 - i3, i7 - i5);
          i1--;
          if (bool) {
            break label556;
          }
          if (i10 != 0) {
            break label552;
          }
        } while (i10 == 0);
      }
    }
    if (!bool) {
      this.p = new b_();
    }
    label552:
    label556:
    int[] arrayOfInt1;
    int[] arrayOfInt2;
    int[] arrayOfInt3;
    if (!bool) {
      if (d())
      {
        if (!bool)
        {
          if (this.t)
          {
            arrayOfInt1 = new int[this.l.length];
            localObject = new int[this.l.length];
            arrayOfInt2 = new int[this.l.length];
            arrayOfInt3 = new int[this.l.length];
            a(this.l, arrayOfInt1, (int[])localObject);
            a.i.l.a(this.o, this.p);
            i();
            a(this.l, arrayOfInt2, arrayOfInt3);
            c(arrayOfInt1, (int[])localObject, this.l);
            h();
            a(this.o);
            i();
            h();
            a(arrayOfInt2, arrayOfInt3, this.l);
            if (bool) {
              break label1195;
            }
            if (i10 == 0) {
              break label1188;
            }
          }
          a.i.l.a(this.o, this.p);
          i();
        }
        if (bool) {
          break label1195;
        }
        if (i10 == 0) {
          break label1188;
        }
      }
    }
    if (!bool)
    {
      if (this.t)
      {
        arrayOfInt1 = new int[this.l.length];
        localObject = new int[this.l.length];
        arrayOfInt2 = new int[this.l.length];
        arrayOfInt3 = new int[this.l.length];
        a(this.l);
        f();
        a(this.l, arrayOfInt1, (int[])localObject);
        a.i.l.a(this.o, this.p);
        i();
        a(this.l, arrayOfInt2, arrayOfInt3);
        c(arrayOfInt1, (int[])localObject, this.l);
        h();
        a(this.o);
        i();
        h();
        a(arrayOfInt2, arrayOfInt3, this.l);
        e();
        a(this.l);
        g();
        a(this.l, arrayOfInt1, (int[])localObject);
        a.i.l.a(this.o, this.p);
        i();
        a(this.l, arrayOfInt2, arrayOfInt3);
        c(arrayOfInt1, (int[])localObject, this.l);
        h();
        a(this.o);
        i();
        h();
        a(arrayOfInt2, arrayOfInt3, this.l);
        g();
        c(this.l);
        c(this.l);
        if (bool) {
          break label1195;
        }
        if (i10 == 0) {}
      }
      else
      {
        f();
        a.i.l.a(this.o, this.p);
        i();
      }
    }
    else
    {
      label1037:
      i2 = ((bool) || (this.v)) && (this.u != null) ? 1 : 0;
      if (!bool)
      {
        if (i2 != 0)
        {
          h();
          a.i.l.a(this.o, this.p);
          i();
          h();
        }
        e();
        g();
        a.i.l.a(this.o, this.p);
        i();
      }
      if (!bool)
      {
        if (i2 != 0)
        {
          h();
          a.i.l.a(this.o, this.p);
          i();
          h();
        }
        g();
      }
      if (bool) {
        break label1195;
      }
      if (i2 != 0)
      {
        a.i.l.a(this.o, this.p);
        i();
        h();
        a.i.l.a(this.o, this.p);
        i();
        h();
      }
    }
    label1188:
    label1195:
    int i2 = this.o.length - 1;
    if (i2 >= 0) {}
    do
    {
      localObject = this.o[i2];
      int i4 = ((e)localObject).f();
      paramo.b((e)localObject, arrayOfDouble1[(i4 << 1)], arrayOfDouble1[((i4 << 1) + 1)]);
      paramo.a((e)localObject, this.l[i4].x + this.l[i4].width * 0.5D, this.l[i4].y + this.l[i4].height * 0.5D);
      i2--;
      if ((!bool) && (i10 != 0)) {
        return;
      }
      if (i10 == 0) {
        break;
      }
      this.o = null;
      this.l = null;
    } while (bool);
    this.u = null;
  }
  
  private void a(Object[] paramArrayOfObject)
  {
    int i2 = j.b;
    int i1 = (paramArrayOfObject.length - 1) / 2;
    do
    {
      if (i1 < 0) {
        break;
      }
      Object localObject = paramArrayOfObject[i1];
      paramArrayOfObject[i1] = paramArrayOfObject[(paramArrayOfObject.length - 1 - i1)];
      paramArrayOfObject[(paramArrayOfObject.length - 1 - i1)] = localObject;
      i1--;
    } while (i2 == 0);
  }
  
  private void e()
  {
    boolean bool = j.c;
    int i2 = j.b;
    int i1 = this.o.length - 1;
    if (i1 >= 0) {
      this.l[i1].width = this.m[i1];
    }
    do
    {
      this.l[i1].x = this.n[i1];
      i1--;
      if ((!bool) && (i2 != 0)) {
        return;
      }
      if (i2 == 0) {
        break;
      }
      this.m = null;
    } while (bool);
    this.n = null;
  }
  
  private void a(Rectangle[] paramArrayOfRectangle)
  {
    boolean bool = j.c;
    int i2 = j.b;
    do
    {
      for (int i1 = paramArrayOfRectangle.length - 1; i2 == 0; i1--)
      {
        if (i1 < 0) {
          break;
        }
        paramArrayOfRectangle[i1].x <<= 1;
        paramArrayOfRectangle[i1].y <<= 1;
        paramArrayOfRectangle[i1].width <<= 1;
        paramArrayOfRectangle[i1].height <<= 1;
      }
    } while (bool);
  }
  
  private void c(Rectangle[] paramArrayOfRectangle)
  {
    boolean bool = j.c;
    int i2 = j.b;
    do
    {
      for (int i1 = paramArrayOfRectangle.length - 1; i2 == 0; i1--)
      {
        if (i1 < 0) {
          break;
        }
        paramArrayOfRectangle[i1].x >>= 1;
        paramArrayOfRectangle[i1].y >>= 1;
        paramArrayOfRectangle[i1].width >>= 1;
        paramArrayOfRectangle[i1].height >>= 1;
      }
    } while (bool);
  }
  
  private void f()
  {
    boolean bool = j.c;
    int i2 = j.b;
    this.m = new int[this.l.length];
    this.n = new int[this.l.length];
    a.i.l.a(this.o, this.p);
    z localz = new z();
    int i1 = this.o.length - 1;
    if (i1 >= 0)
    {
      this.m[i1] = this.l[i1].width;
      this.n[i1] = this.l[i1].x;
    }
    while (bool)
    {
      localz.add(new c_(this.l[i1]));
      i1--;
      if ((!bool) && (i2 != 0)) {
        return;
      }
      if (i2 == 0) {
        break;
      }
    }
    m.a(localz, new m.g_()
    {
      public void a(Object paramAnonymousObject1, Object paramAnonymousObject2)
      {
        boolean bool = j.c;
        int m = j.b;
        Rectangle localRectangle1 = ((l.c_)paramAnonymousObject1).a;
        Rectangle localRectangle2 = ((l.c_)paramAnonymousObject2).a;
        Rectangle localRectangle3 = localRectangle1.intersection(localRectangle2);
        if (((bool) || (localRectangle3.width != 0)) && ((bool) || (localRectangle3.height != 0)))
        {
          if (!bool) {
            if (l.this.k == 0)
            {
              if (!bool) {}
              i = localRectangle3.width < localRectangle3.height ? 1 : 0;
              if (bool) {
                break label461;
              }
              if (m == 0) {
                break label459;
              }
            }
          }
          if (!bool) {
            if (l.this.k == 1)
            {
              if (!bool) {}
              i = Math.abs(localRectangle1.x - localRectangle2.x + (localRectangle1.width - localRectangle2.width) / 2) > Math.abs(localRectangle1.y - localRectangle2.y + (localRectangle1.height - localRectangle2.height) / 2) ? 1 : 0;
              if (bool) {
                break label461;
              }
              if (m == 0) {
                break label459;
              }
            }
          }
          int j;
          int k;
          if (!bool) {
            if (l.a(localRectangle1, localRectangle2))
            {
              j = Math.min(localRectangle2.y + localRectangle2.height - localRectangle1.y, localRectangle1.y + localRectangle1.height - localRectangle2.y);
              k = Math.min(localRectangle2.x + localRectangle2.width - localRectangle1.x, localRectangle1.x + localRectangle1.width - localRectangle2.x);
              if (!bool) {}
              i = k < j ? 1 : 0;
              if (bool) {
                break label461;
              }
              if (m == 0) {
                break label459;
              }
            }
          }
          if (!bool) {
            if (l.a(localRectangle2, localRectangle1))
            {
              j = Math.min(localRectangle1.y + localRectangle1.height - localRectangle2.y, localRectangle2.y + localRectangle2.height - localRectangle1.y);
              k = Math.min(localRectangle1.x + localRectangle1.width - localRectangle2.x, localRectangle2.x + localRectangle2.width - localRectangle1.x);
              if (!bool) {}
              i = k < j ? 1 : 0;
              if (bool) {
                break label461;
              }
              if (m == 0) {
                break label459;
              }
            }
          }
          if (!bool) {}
          int i = localRectangle3.width < localRectangle3.height ? 1 : 0;
          label459:
          label461:
          if ((bool) || (i != 0))
          {
            if (!bool) {
              if (localRectangle2.x >= localRectangle1.x)
              {
                if (bool) {
                  break label612;
                }
                if (localRectangle2.x < localRectangle1.x + localRectangle1.width)
                {
                  j = (1 + localRectangle1.x + localRectangle1.width - localRectangle2.x) / 2;
                  if (!bool)
                  {
                    if (j >= localRectangle1.width) {
                      return;
                    }
                    if (bool) {}
                  }
                  else
                  {
                    if (j >= localRectangle2.width) {
                      return;
                    }
                    localRectangle1.width -= j;
                    localRectangle2.x += j;
                    localRectangle2.width -= j;
                  }
                  if ((!bool) && (m == 0)) {
                    return;
                  }
                }
              }
            }
            label612:
            if (((bool) || (localRectangle1.x >= localRectangle2.x)) && ((bool) || (localRectangle1.x < localRectangle2.x + localRectangle2.width)))
            {
              j = (1 + localRectangle2.x + localRectangle2.width - localRectangle1.x) / 2;
              if ((bool) || ((j < localRectangle1.width) && (j < localRectangle2.width)))
              {
                localRectangle2.width -= j;
                localRectangle1.x += j;
                localRectangle1.width -= j;
              }
            }
          }
        }
      }
    });
  }
  
  private void g()
  {
    int i6 = j.b;
    int i1 = this.l.length - 1;
    do
    {
      if (i1 < 0) {
        break;
      }
      Rectangle localRectangle = this.l[i1];
      int i2 = localRectangle.x;
      int i3 = localRectangle.y;
      int i4 = localRectangle.width;
      int i5 = localRectangle.height;
      localRectangle.x = i3;
      localRectangle.y = i2;
      localRectangle.width = i5;
      localRectangle.height = i4;
      i1--;
    } while (i6 == 0);
  }
  
  private void a(int[] paramArrayOfInt1, int[] paramArrayOfInt2, Rectangle[] paramArrayOfRectangle)
  {
    boolean bool = j.c;
    int i2 = j.b;
    int i1 = paramArrayOfRectangle.length - 1;
    do
    {
      while (i2 == 0)
      {
        if (i1 < 0) {
          break;
        }
        paramArrayOfRectangle[i1].x = (paramArrayOfRectangle[i1].x + paramArrayOfInt1[i1] >> 1);
        paramArrayOfRectangle[i1].y = (paramArrayOfRectangle[i1].y + paramArrayOfInt2[i1] >> 1);
        i1--;
      }
    } while (bool);
  }
  
  private void a(Rectangle[] paramArrayOfRectangle, int[] paramArrayOfInt1, int[] paramArrayOfInt2)
  {
    boolean bool = j.c;
    int i2 = j.b;
    int i1 = paramArrayOfRectangle.length - 1;
    do
    {
      while (i2 == 0)
      {
        if (i1 < 0) {
          break;
        }
        paramArrayOfInt1[i1] = paramArrayOfRectangle[i1].x;
        paramArrayOfInt2[i1] = paramArrayOfRectangle[i1].y;
        i1--;
      }
    } while (bool);
  }
  
  private void c(int[] paramArrayOfInt1, int[] paramArrayOfInt2, Rectangle[] paramArrayOfRectangle)
  {
    boolean bool = j.c;
    int i2 = j.b;
    int i1 = paramArrayOfRectangle.length - 1;
    do
    {
      while (i2 == 0)
      {
        if (i1 < 0) {
          break;
        }
        paramArrayOfRectangle[i1].x = paramArrayOfInt1[i1];
        paramArrayOfRectangle[i1].y = paramArrayOfInt2[i1];
        i1--;
      }
    } while (bool);
  }
  
  private void h()
  {
    int i2 = j.b;
    int i1 = this.l.length - 1;
    do
    {
      if (i1 < 0) {
        break;
      }
      Rectangle localRectangle = this.l[i1];
      localRectangle.y = (-(localRectangle.y + localRectangle.height));
      i1--;
    } while (i2 == 0);
  }
  
  private void i()
  {
    boolean bool = j.c;
    int i12 = j.b;
    int i2;
    int i1 = i2 = 2147483647;
    int i4;
    int i3 = i4 = -2147483648;
    int i5 = this.l.length - 1;
    do
    {
      if (i5 < 0) {
        break;
      }
      localObject1 = this.l[i5];
      if (i12 != 0) {
        break label179;
      }
      if (!bool) {
        if (((Rectangle)localObject1).x < i1) {
          i1 = ((Rectangle)localObject1).x;
        }
      }
      if (!bool) {
        if (((Rectangle)localObject1).y < i2) {
          i2 = ((Rectangle)localObject1).y;
        }
      }
      if (!bool)
      {
        if (((Rectangle)localObject1).x + ((Rectangle)localObject1).width > i3) {
          i3 = ((Rectangle)localObject1).x + ((Rectangle)localObject1).width;
        }
        if (bool) {}
      }
      else
      {
        if (((Rectangle)localObject1).y + ((Rectangle)localObject1).height > i4) {
          i4 = ((Rectangle)localObject1).y + ((Rectangle)localObject1).height;
        }
        i5--;
      }
    } while (i12 == 0);
    label179:
    Rectangle localRectangle1 = new Rectangle(i1, i2, i3 - i1, i4 - i2);
    Object localObject1 = new z();
    d_ locald_1 = new d_(localRectangle1.y, localRectangle1.x - 10, localRectangle1.x + localRectangle1.width + 10);
    ((z)localObject1).add(locald_1);
    int i6 = 0;
    label375:
    do
    {
      if (i6 >= this.o.length) {
        break;
      }
      Rectangle localRectangle2 = this.l[this.o[i6].f()];
      int i7 = localRectangle2.y;
      int i8 = localRectangle2.x;
      int i9 = localRectangle2.x + localRectangle2.width;
      Object localObject2 = null;
      Object localObject3 = null;
      int i10 = localRectangle1.y;
      for (Object localObject4 = ((z)localObject1).f();; localObject4 = ((v)localObject4).a())
      {
        if (localObject4 == null) {
          break label375;
        }
        locald_1 = (d_)((v)localObject4).c();
        if ((bool) || (i12 != 0)) {
          break;
        }
        if (i8 < locald_1.c)
        {
          localObject2 = localObject4;
          i10 = Math.max(i10, locald_1.a);
          break label375;
        }
      }
      for (;;)
      {
        if (localObject4 == null) {
          break label439;
        }
        locald_1 = (d_)((v)localObject4).c();
        i10 = Math.max(i10, locald_1.a);
        if ((bool) || (i12 != 0)) {
          break;
        }
        if (i9 <= locald_1.c)
        {
          localObject3 = localObject4;
          break label439;
        }
        localObject4 = ((v)localObject4).a();
      }
      if (!bool)
      {
        if (a(this.o[i6]))
        {
          if (bool) {
            break label1004;
          }
          if (i10 > i7)
          {
            i11 = i7 + localRectangle2.height;
            locald_2 = new d_(i11, i8, i9);
            locald_3 = (d_)localObject2.c();
            locald_4 = (d_)((v)localObject3).c();
            if (localObject2 == localObject3)
            {
              if (bool) {
                continue;
              }
              if (locald_3.a >= locald_2.a) {
                break label1344;
              }
              if (!bool)
              {
                if (locald_3.b == i8)
                {
                  if (bool) {
                    break label646;
                  }
                  if (locald_3.c == i9)
                  {
                    localObject2.a(locald_2);
                    if (bool) {
                      continue;
                    }
                    if (i12 == 0) {
                      break label1344;
                    }
                  }
                }
                locald_4 = new d_(locald_3.a, i9, locald_3.c);
                locald_3.c = i8;
                localObject3 = ((z)localObject1).b(locald_4, localObject2);
                ((z)localObject1).b(locald_2, localObject2);
              }
              if (!bool)
              {
                if (locald_3.c == locald_3.b) {
                  ((z)localObject1).h(localObject2);
                }
                if (bool) {
                  continue;
                }
              }
              if (locald_4.c != locald_4.b) {
                break label1344;
              }
              ((z)localObject1).h((v)localObject3);
              if (bool) {
                continue;
              }
              if (i12 == 0) {
                break label1344;
              }
            }
            Object localObject5 = locald_3;
            v localv = localObject2.a();
            if (!bool)
            {
              if (locald_3.a < locald_2.a)
              {
                ((z)localObject1).b(localObject5 = new d_(i11, i8, locald_3.c), localObject2);
                locald_3.c = i8;
              }
              if (bool) {}
            }
            else
            {
              if (locald_4.a >= locald_2.a) {
                break label810;
              }
              ((z)localObject1).a(new d_(i11, locald_4.b, i9), (v)localObject3);
            }
            locald_4.b = i9;
            localObject4 = localv;
            do
            {
              if (localObject4 == localObject3) {
                break;
              }
              d_ locald_5 = (d_)((v)localObject4).c();
              if (i12 != 0) {
                break label941;
              }
              if (locald_5.a > i11)
              {
                localObject5 = locald_5;
                if (bool) {
                  continue;
                }
                if (i12 == 0) {}
              }
              else
              {
                locald_5.a = i11;
                if (!bool) {
                  if (((d_)localObject5).a == i11)
                  {
                    ((z)localObject1).h((v)localObject4);
                    ((d_)localObject5).c = locald_5.c;
                    if (bool) {
                      continue;
                    }
                    if (i12 == 0) {
                      break label914;
                    }
                  }
                }
                localObject5 = locald_5;
              }
              localObject4 = ((v)localObject4).a();
            } while (i12 == 0);
            if (!bool)
            {
              if (locald_3.c == locald_3.b) {
                ((z)localObject1).h(localObject2);
              }
              if (bool) {
                continue;
              }
            }
            if (locald_4.c != locald_4.b) {
              break label1344;
            }
            ((z)localObject1).h((v)localObject3);
            if (bool) {
              continue;
            }
            if (i12 == 0) {
              break label1344;
            }
          }
        }
        i4 = Math.max(i7, i10);
      }
      int i11 = i4 + localRectangle2.height;
      localRectangle2.y = i4;
      d_ locald_2 = new d_(i11, i8, i9);
      d_ locald_3 = (d_)localObject2.c();
      d_ locald_4 = (d_)((v)localObject3).c();
      if (!bool)
      {
        if (localObject2 == localObject3)
        {
          if (!bool)
          {
            if (locald_3.b == i8)
            {
              if (bool) {
                break label1167;
              }
              if (locald_3.c == i9)
              {
                localObject2.a(locald_2);
                if (bool) {
                  continue;
                }
                if (i12 == 0) {
                  break label1344;
                }
              }
            }
            locald_4 = new d_(locald_3.a, i9, locald_3.c);
            locald_3.c = i8;
            localObject3 = ((z)localObject1).b(locald_4, localObject2);
            ((z)localObject1).b(locald_2, localObject2);
          }
          if (!bool)
          {
            if (locald_3.c == locald_3.b) {
              ((z)localObject1).h(localObject2);
            }
            if (bool) {
              continue;
            }
          }
          if (locald_4.c == locald_4.b)
          {
            ((z)localObject1).h((v)localObject3);
            if (bool) {
              continue;
            }
            if (i12 == 0) {}
          }
        }
        else
        {
          locald_3.c = i8;
          locald_4.b = i9;
        }
      }
      else
      {
        localObject4 = localObject2.a();
        do
        {
          do
          {
            if (localObject4 == localObject3) {
              break;
            }
            ((z)localObject1).h((v)localObject4);
            localObject4 = ((v)localObject4).a();
            if (bool) {
              break label1297;
            }
            if (i12 != 0) {
              break label1292;
            }
          } while (i12 == 0);
        } while (bool);
        ((z)localObject1).b(locald_2, localObject2);
        if (!bool)
        {
          if (locald_3.c == locald_3.b) {
            ((z)localObject1).h(localObject2);
          }
          if (bool) {
            continue;
          }
        }
        if (locald_4.c == locald_4.b) {
          ((z)localObject1).h((v)localObject3);
        }
      }
      i6++;
    } while (i12 == 0);
    label439:
    label1004:
    return;
  }
  
  private boolean a(e parame)
  {
    if ((j.c) || (this.u != null)) {
      return this.u.getBool(parame);
    }
    return false;
  }
  
  public boolean j()
  {
    return this.t;
  }
  
  public void b(boolean paramBoolean)
  {
    this.t = paramBoolean;
  }
  
  static final boolean a(Rectangle paramRectangle1, Rectangle paramRectangle2)
  {
    boolean bool = j.c;
    if (((bool) || (paramRectangle1.width > 0)) && ((bool) || (paramRectangle1.height > 0)) && ((bool) || (paramRectangle2.width > 0)) && ((bool) || (paramRectangle2.height > 0)) && ((bool) || (paramRectangle2.x >= paramRectangle1.x)) && ((bool) || (paramRectangle2.x + paramRectangle2.width <= paramRectangle1.x + paramRectangle1.width))) {
      if (!bool)
      {
        if (paramRectangle2.y < paramRectangle1.y) {
          break label132;
        }
        if (bool) {
          break label129;
        }
      }
    }
    label129:
    label132:
    return paramRectangle2.y + paramRectangle2.height <= paramRectangle1.y + paramRectangle1.height;
  }
  
  static class c_
    implements p
  {
    public Rectangle a;
    private t b;
    
    c_(Rectangle paramRectangle)
    {
      this.a = paramRectangle;
      this.b = new t(paramRectangle.x, paramRectangle.y, paramRectangle.width, paramRectangle.height);
    }
    
    public t a()
    {
      return this.b;
    }
  }
  
  static class d_
  {
    int a;
    int b;
    int c;
    
    d_(int paramInt1, int paramInt2, int paramInt3)
    {
      this.a = paramInt1;
      this.b = paramInt2;
      this.c = paramInt3;
    }
    
    public String toString()
    {
      return "y=" + this.a + " x1=" + this.b + " x2=" + this.c;
    }
  }
  
  final class b_
    implements Comparator, l.j_
  {
    b_() {}
    
    public int compare(Object paramObject1, Object paramObject2)
    {
      boolean bool3 = j.c;
      e locale1 = (e)paramObject1;
      Rectangle localRectangle1 = l.this.l[locale1.f()];
      e locale2 = (e)paramObject2;
      Rectangle localRectangle2 = l.this.l[locale2.f()];
      boolean bool1 = l.this.a(locale1);
      boolean bool2 = l.this.a(locale2);
      if (!bool3) {
        if (bool1 != bool2)
        {
          if (bool3) {
            break label163;
          }
          if (localRectangle1.x <= localRectangle2.x + localRectangle2.width)
          {
            if (bool3) {
              break label198;
            }
            if (localRectangle1.x + localRectangle1.width >= localRectangle2.x) {
              break label196;
            }
          }
        }
      }
      label163:
      int i = a.i.l.a(localRectangle1.y + localRectangle1.height * 0.5D, localRectangle2.y + localRectangle2.height * 0.5D);
      if (!bool3) {
        if (i != 0) {
          return i;
        }
      }
      return a.i.l.a(((e)paramObject2).f(), ((e)paramObject1).f());
      label196:
      label198:
      if (!bool3) {
        if (bool1)
        {
          if (!bool3) {}
          return localRectangle2.y + localRectangle2.height < localRectangle1.y ? 1 : -1;
        }
      }
      if (!bool3) {}
      return localRectangle1.y + localRectangle1.height < localRectangle2.y ? -1 : 1;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.f.g.l

 * JD-Core Version:    0.7.0.1

 */